import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Housell from '../views/housell.vue'
import House from '../views/house.vue'
import Mine from '../views/mine.vue'
import Unitdetail from '../views/unitdetail.vue'
import Unitsubmit from '../views/unitsubmit.vue'
import Housesubmit from '../views/housesubmit.vue'
import Unitproperty from '../views/unitproperty.vue'
import Agentrecord from '../views/agentrecord.vue'
import Agent from '../views/agent.vue'
import Center from '../views/mine/center.vue'
import Search from '../views/search/search.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/search',
    name: 'Search',
    component: Search
  },

  {
    path: '/housell',
    name: 'Housell',
    component: Housell
  },
  {
    path: '/house',
    name: 'House',
    component: House
  },
  {
    path: '/mine',
    name: 'Mine',
    component: Mine
  },
  {
    path: '/center',
    name: 'Center',
    component: Center
  },

  {
    path: '/unitsubmit',
    name: 'Unitsubmit',
    component: Unitsubmit
  },

  {
    path: '/unitdetail',
    name: 'Unitdetail',
    component: Unitdetail
  },
  
  {
    path: '/housesubmit',
    name: 'Housesubmit',
    component: Housesubmit
  },
  {
    path: '/unitproperty',
    name: 'Unitproperty',
    component: Unitproperty
  },
  {
    path: '/agent',
    name: 'Agent',
    component: Agent
  },
  {
    path: '/agentrecord',
    name: 'Agentrecord',
    component: Agentrecord
  },

  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
